﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="goods_add04.aspx.cs" Inherits="WebSite.admin.product.goods_add04" %>


<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>良臣直销网 </title>
    <link href="../main.css" rel="stylesheet" type="text/css" />
    <script language="javascript">
        parent.maintitle.innerHTML = "商品管理";
        parent.contentmain.innerHTML = "<span class='title01'>所在位置：</span>添加新商品-商品相册&nbsp;&nbsp;<img src='images/sort_desc.gif' /> <a href='product/goods.aspx' target='content'><font color=#ff0000>商品列表</font></a>"
    </script>
    <script language='javascript'>
	var path=(window.top.location).toString();
	if(path.indexOf('login.aspx')==-1){
	if (path.indexOf('index.aspx')==-1){
	 window.top.location='index.aspx';
	}
	}
	function clicka()
	{
	<% if (Request.QueryString["pid"] != null){}else{%>
	alert("- 商品名称不能为空。\n- 商品分类不能不选。");
	return false;
	<%} %>
	}
	</script>
   <script type="text/javascript" language="javascript">
       var i = 1
       function addFile() {
           if (i < 8) {
               var str = '<BR>&nbsp;&nbsp;&nbsp; 说明<input name="text" type="text" style="width: 100px" maxlength="20" /> 上传图片<input type="file" name="File" runat="server" style="width: 300px"/>'
               document.getElementById('MyFile').insertAdjacentHTML("beforeEnd", str)

           }
           else {
               alert("您一次最多只能上传8张图片！")
           }
           i++
       } 
   </script> 
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <center>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#F1F4F7">
<tr>
<td height="382" align="center" valign="top">
  <br />
  <%if (Request.QueryString["pid"] != null){ %>
  <table Width="98%" border="1" cellpadding="3" cellspacing="1" bordercolor="#E2E7EB">
    <tr align="center">
      <td bgcolor="#E2E7EB"><a href="goods_add.aspx?pid=<%=Request.QueryString["pid"]%>">通用信息</a></td>
      <td bgcolor="#E2E7EB"><a href="goods_add02.aspx?pid=<%=Request.QueryString["pid"]%>">详细描述</a></td>
      <!--td bgcolor="#E2E7EB"><a href="goods_add08.aspx?pid=<%=Request.QueryString["pid"]%>">商品参数</a></td-->
      <td bgcolor="#E2E7EB"><a href="goods_add03.aspx?pid=<%=Request.QueryString["pid"]%>">其他信息</a></td>
      <td bgcolor="#C9D2DA"><a href="goods_add04.aspx?pid=<%=Request.QueryString["pid"]%>" class="menu02">商品相册</a></td>
      <td bgcolor="#E2E7EB"><a href="goods_add05.aspx?pid=<%=Request.QueryString["pid"]%>">关联商品</a></td>
      <!--td bgcolor="#E2E7EB"><a href="goods_add06.aspx?pid=<%=Request.QueryString["pid"]%>">配件</a></td-->
      <td bgcolor="#E2E7EB"><a href="goods_add07.aspx?pid=<%=Request.QueryString["pid"]%>">关联文章</a></td>
    </tr>
  </table>
  <%}else{ %>
  <table Width="98%" border="1" cellpadding="3" cellspacing="1" bordercolor="#E2E7EB">
    <tr align="center">
      <td bgcolor="#E2E7EB"><a href="goods_add.aspx">通用信息</a></td>
      <td bgcolor="#E2E7EB"><a href="goods_add02.aspx">详细描述</a></td>
      <!--td bgcolor="#E2E7EB"><a href="goods_add08.aspx">商品参数</a></td-->
      <td bgcolor="#E2E7EB"><a href="goods_add03.aspx">其他信息</a></td>
      <td bgcolor="#C9D2DA"><a href="goods_add04.aspx" class="menu02">商品相册</a></td>
      <td bgcolor="#E2E7EB"><a href="goods_add05.aspx">关联商品</a></td>
      <!--td bgcolor="#E2E7EB"><a href="goods_add06.aspx">配件</a></td-->
      <td bgcolor="#E2E7EB"><a href="goods_add07.aspx">关联文章</a></td>
    </tr>
  </table>
  <%} %>
  <br />
  <asp:Panel ID="Panel5" runat="server" Width="100%"> 
  <table Width="98%" border="0" cellpadding="0" cellspacing="0">
    <!-- 图片列表 -->
    <tr>
      <td>
      <asp:DataList ID="DataList1" runat="server" RepeatColumns="4" CellPadding="4" ForeColor="#333333" Height="96px" Width="98%">
       <ItemTemplate>
               <div id="gallery_1" style="float:left; text-align:center; border: 1px solid #DADADA; margin: 4px; padding:2px;">
                <a href="goods_add04.aspx?picid=<%# DataBinder.Eval(Container.DataItem, "picid")%>&pid=<%# DataBinder.Eval(Container.DataItem, "proid")%>&action=del" onclick="if (confirm('您确实要删除该图片吗？')){ }else{return false;}">[-]</a><br />
                <a href="../../uploadfile/<%# DataBinder.Eval(Container.DataItem, "picurl")%>" target="_blank">
                <img src="../../uploadfile/<%# DataBinder.Eval(Container.DataItem, "picurl")%>" height="100" width="100" border="0" />
                </a><br />
                <input value="<%# DataBinder.Eval(Container.DataItem, "content")%>" size="15" name="content_<%# DataBinder.Eval(Container.DataItem, "picid")%>" id="content_<%# DataBinder.Eval(Container.DataItem, "picid")%>"/>
              </div>
        </ItemTemplate>
      </asp:DataList>    
              </td>
          </tr>
          <tr><td>&nbsp;</td></tr>
    <!-- 上传图片 -->
    <tr>
      <td align="left"><P id="MyFile">
      <a onclick="addFile()" href="#">[+]</a> 说明<input name="text" type="text" style="width: 100px" maxlength="20" />
        上传图片<input id="File1" type="file" name="File" runat="server" style="width: 300px"/> </P></td>
    </tr>
    <tr>
      <td height="50" align="center"><table Width="98%" height="22" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td align="center" style="height: 24px; width: 758px;">
          <asp:ImageButton ID="ImageButton1" ImageUrl="../images/buttom-02.gif" runat="server" OnClick="ImageButton1_Click" />
       <a href="javascript:form1.reset();"><img src="../images/button03.gif" border="0" /></a></td>
          </tr>
      </table></td>
    </tr>
  </table>
  </asp:Panel>
  </td>
</tr>
</table>
</center>
    </div>
    </form>
</body>
</html>
